<?php
    header('content-type:text/html;charset=utf-8');
    mysql_connect('127.0.0.1','root','root');
    mysql_select_db('logistics');
    $sql = "select * from ruku inner join kuhao where ruku.r_what = kuhao.k_what";
    $res = mysql_query($sql);
    $arr = array();
    while($row = mysql_fetch_assoc($res)){
        array_push($arr,$row);
    }
    print_r(json_encode($arr));
?>